package com.example.demo.tools;

import com.example.demo.bean.Menus;

import java.util.Comparator;

public class MyComparator implements Comparator<Menus> {
    @Override
    public int compare(Menus o1, Menus o2) {
        Menus m1 = (Menus)o1;
        Menus m2 = (Menus)o2;

        if(m1.getPerm_level() > m2.getPerm_level()){
            return 1;
        }else{
            return -1;
        }
    }
}
